package org.order.provider.api.impl;



import java.util.List;

import javax.annotation.Resource;

import org.order.api.OrderServiceApi;
import org.order.entity.DbOrder;
import org.order.entity.mapper.DbOrderMapper;

import com.alibaba.dubbo.config.annotation.Service;

@Service(
        version = "1.0.0",
        application = "${dubbo.application.id}",
        protocol = "${dubbo.protocol.id}",
        registry = "${dubbo.registry.id}"
)
public class OrderServiceImpl implements OrderServiceApi {

	@Resource
	private DbOrderMapper orderRepository;

	@Override
	public List<DbOrder> getOrder() {
		
		System.out.println(this.orderRepository.toString());
		
		// TODO Auto-generated method stub
		return this.orderRepository.selectAll();
	}

	@Override
	public DbOrder getOrderById() {
		// TODO Auto-generated method stub
		return this.orderRepository.selectByPrimaryKey(1);
	}
	

	
}
